/* 处理ES6内置API的兼容 */
import '@babel/polyfill'
import A from './A.js'
import B from './B.js'
import './index.less'
import './index.scss'
console.log(A(1, 2, 3, 4, 5));
console.log(B(1, 2, 3, 4, 5));
// 动态创建图片
import boy from './images/boy.jpg';
const imgBox = new Image;
// imgBox.src = './assets/images/boy.jpg'; //不能使用本地静态文件的相对地址「因为打包后，文件的目录全都变了」，可以使用外网的绝对地址！！
imgBox.src = boy;
document.querySelector('#app').appendChild(imgBox);

/* let a = 10;
console.log(a);
const b = 20;
console.log(b);
const fn = () => { }
fn(); */
// new Promise(resolve => { resolve(true) })
/* fetch('/jian/asimov/subscriptions/recommended_collections').then(response=>{
    return response.json()
}).then(value=>{
    console.log('简书',value);
})
fetch('/zhi/news/latest').then(response=>{
    return response.json()
}).then(value=>{
    console.log('知乎',value);
}) */